﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
using System.Text;
using T.FAS.Runtime.Base.Common;
using T.FAS.Runtime.ScheduleJob.SPI;
using T.ServiceComponent.Kernel.Service;
using T.ServiceComponent.Monitor.Client;

namespace T.FAS.Runtime.ScheduleJob.Service
{
    public class ScheduleJobRTPMonitor
    {
        #region 监控元数据
        private static string MD_ScheduleJobEngineRunning = "FAS.ScheduleJob.Engine.Running";
        #endregion
        public static void MonitorScheduleJobEngineRunning()
        {
            try
            {
                MonitorClient.Send(MD_ScheduleJobEngineRunning, 1,
                    new Dictionary<string, string>()
                    {
                        { "ProcessName",FASContextHelper.GetInstance().ProcessName},
                        { "HostNameProcess",FASContextHelper.GetInstance().HostName+FASContextHelper.GetInstance().ProcessID}
                    });
            }
            catch
            { }
        }

    }
}
